package com.fruit.web.vo.genl;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.model.SelectItem;

import com.fruit.utils.MessageFactory;
import com.fruit.web.constant.EjdConstants;
@ManagedBean(name="existProductStatus")
@SessionScoped
public class ExistProductStatusBean implements java.io.Serializable{
	
	
	private  SelectItem[] statusItems;

	public SelectItem[] getStatusItems() {
		return statusItems;
	}

	public void setStatusItems(SelectItem[] statusItems) {
		this.statusItems = statusItems;
	}
	
	public ExistProductStatusBean(){
		SelectItem[] tempStatusItems = new SelectItem[3];
		tempStatusItems[0] = new SelectItem(EjdConstants.PRODUCT_SALE_STATUS,MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"product.sale.status.display", FacesMessage.SEVERITY_ERROR).getDetail());
		tempStatusItems[1] = new SelectItem(EjdConstants.PRODUCT_NOT_FOR_SALE_STATUS,MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"product.notforsale.status.display", FacesMessage.SEVERITY_ERROR).getDetail());
		tempStatusItems[2] = new SelectItem(EjdConstants.PRODUCT_OUTOFSEASON_STATUS,MessageFactory.getMessage(EjdConstants.USER_BUNDLE_NAME,"product.outofseason.status.display", FacesMessage.SEVERITY_ERROR).getDetail());
		this.setStatusItems(tempStatusItems);
	}
	
}
